import React, {Component} from 'react'
import {Card} from "primereact/card";
import NewsDialog from "../dialog/NewsDialog";
import {Dialog} from "primereact/dialog";

export default class News extends Component {
    constructor() {
        super();
        this.state = {
            newsVisible: false,
        }
    }


    render() {
        return (
            <div>
                <div></div>
                <Card>
                    <div onClick={() => this.setState({newsVisible: true})}>
                        <i className="pi pi-calendar" style={{'fontSize': '6em'}}></i>
                        <div className="word">
                            <h2>快讯</h2>
                            <h4>行业最新动态</h4>
                        </div>
                    </div>
                </Card>

                <Dialog visible={this.state.newsVisible}
                        header="快讯"
                        onHide={() => this.setState({newsVisible: false})}
                        modal={true}>
                    <NewsDialog/>
                </Dialog>

            </div>
        )
    }
}